//package com.qc.controller;
//
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//
//@Component
//public class CronScheduledTask {
//    @Scheduled(cron = "0 0/1 * * * ?") // 每分钟执行一次
//    public void cronTask() {
//        LocalDateTime now = LocalDateTime.now();
//        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
//        String formattedDateTime = now.format(formatter);
//        System.out.println("Cron 任务执行时间: " + formattedDateTime);
//    }
//}